
#pragma region INCLUDES
#include <math.h>
#include "Vector2.h"
#include "Vector3.h"
#include "Box3D.h"
#include "Box2D.h"
#pragma endregion



namespace Physics
{

#pragma region CONSTANT_VARs
	//
	static const double PI = 3.141592;
	static const double PI_TWO = PI * 2;

	static const double RAD_30_DEG = PI/6;
	static const double RAD_45_DEG = PI/4;
	static const double RAD_60_DEG = PI/3;
	static const double RAD_90_DEG = PI/2;
	static const double RAD_270_DEG = (3 *PI)/2;

	static const double GRAVITY = 9.8;

	static const int ZERO = 0;

#pragma endregion


	class MathHelper
	{
	public:
		static float sqrDistancePointToCube(Vector3 &point, const Box3D &box);
		static float sqrDistancePointToBox(Vector2 &point, const Box2D &box);
		static float squared(float const &value);
		static float findDistance(Vector2 const &lhs, Vector2 const &rhs);
		static float findDistance(Vector3 const &lhs, Vector3 const &rhs);
		static float dotProduct(Vector2 const &lhs, Vector2 const &rhs);
		static float dotProduct(Vector3 const &lhs, Vector3 const &rhs);
		static float lengthSquared(Vector2 const &vec);
		static float lengthSquared(Vector3 const &vec);

		static float degreesToRadians(const float angleDeg);
		static float radiansToDegrees(const float angleRad);
		static Vector2 degreesToVector2(const float angleDeg);
		static Vector2 radiansToVector2(const float angleRad);

		//static Vector3 degreesToVector3(const float angleDeg);
		//static Vector3 radToVector3(const float angleRad);

		//Magnitude: sqrt (x^2 + y^2)
		static float magnitude(Vector2 const &vec);

		//Magnitude: sqrt (x^2 + y^2 + z^2)
		static float magnitude(Vector3 const &vec);

		static Vector2 normal(Vector2 const &vec);
		static Vector3 normal(Vector3 const &vec);

		static Vector3 crossProduct(Vector3 const &lhs, Vector3 const &rhs);
	};
} /* NAMESPACE */